# -*- coding:utf-8 -*-
# @FileName  :ent_resultinfo.py
# @Time      :2020/12/17 16:25
# @Author    :Zhoujirong
# @Desc      :
from common.http_request import Request
from biz.support.urls import ServerUrl

class EntResultInfoRequest:
    @classmethod
    def list(cls,cookie):
        '''辖内查询记录页跳转'''
        req = Request(ServerUrl.ent_resultinfo_list_url,headers=cookie)
        return req.get()

    @classmethod
    def get_page(cls, curPage,
                 maxSize,
                 search_EQ_enterpriseName,
                 search_EQ_signCode,
                 search_EQ_uniformSocialCredCode,
                 search_EQ_orgInstCode,
                 search_EQ_qryReason,
                 search_EQ_source,
                 search_EQ_status,
                 search_EQ_operator,
                 search_EQ_operOrg,
                 search_EQ_queryFormat,
                 search_GTE_LTE_queryTime_DATE_RANGE,
                 search_EQ_cstmsysId, cookie):
        '''检索'''
        data = {
            'curPage': curPage,
            'maxSize': maxSize,
            'search_EQ_enterpriseName': search_EQ_enterpriseName,
            'search_EQ_signCode': search_EQ_signCode,
            'search_EQ_uniformSocialCredCode': search_EQ_uniformSocialCredCode,
            'search_EQ_orgInstCode': search_EQ_orgInstCode,
            'search_EQ_qryReason': search_EQ_qryReason,
            'search_EQ_source': search_EQ_source,
            'search_EQ_status': search_EQ_status,
            'search_EQ_queryFormat': search_EQ_queryFormat,
            'search_GTE_LTE_queryTime_DATE_RANGE': search_GTE_LTE_queryTime_DATE_RANGE,
            'search_EQ_operator': search_EQ_operator,
            'search_EQ_operOrg': search_EQ_operOrg,
            'search_EQ_cstmsysId': search_EQ_cstmsysId
        }
        req = Request(ServerUrl.ent_own_report_getpage_url, params=data, headers=cookie)
        return req.get()

    @classmethod
    def detail(cls,id,cookie):
        '''详情跳转'''
        data = {
            'id': id
        }
        req = Request(ServerUrl.per_resultinfo_detail_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def findbyid(cls,id,cookie):
        '''详情'''
        data = {
            'id':id
        }
        req = Request(ServerUrl.ent_resultinfo_findbyid_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def get_flag(cls,
                 search_EQ_enterpriseName,
                 search_EQ_signCode,
                 search_EQ_uniformSocialCredCode,
                 search_EQ_orgInstCode,
                 search_EQ_qryReason,
                 search_EQ_source,
                 search_EQ_status,
                 search_EQ_operator,
                 search_EQ_operOrg,
                 search_EQ_queryFormat,
                 search_GTE_LTE_queryTime_DATE_RANGE,
                 search_EQ_cstmsysId,
                 ids,cookie):
        '''获取是否可导出标志'''
        data = {
            'search_EQ_enterpriseName': search_EQ_enterpriseName,
            'search_EQ_signCode': search_EQ_signCode,
            'search_EQ_uniformSocialCredCode': search_EQ_uniformSocialCredCode,
            'search_EQ_orgInstCode': search_EQ_orgInstCode,
            'search_EQ_qryReason': search_EQ_qryReason,
            'search_EQ_source': search_EQ_source,
            'search_EQ_status': search_EQ_status,
            'search_EQ_queryFormat': search_EQ_queryFormat,
            'search_GTE_LTE_queryTime_DATE_RANGE': search_GTE_LTE_queryTime_DATE_RANGE,
            'search_EQ_operator': search_EQ_operator,
            'search_EQ_operOrg': search_EQ_operOrg,
            'search_EQ_cstmsysId': search_EQ_cstmsysId,
            'ids':ids
        }
        req = Request(ServerUrl.ent_resultinfo_getexportflag_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def exportload(cls,
                 search_EQ_enterpriseName,
                search_EQ_signCode,
                search_EQ_uniformSocialCredCode,
                search_EQ_orgInstCode,
                search_EQ_qryReason,
                 search_EQ_source,
                 search_EQ_status,
                 search_EQ_operator,
                 search_EQ_operOrg,
                 search_EQ_queryFormat,
                 search_GTE_LTE_queryTime_DATE_RANGE,
                 search_EQ_cstmsysId,ids,cookie):
        '''导出'''
        data = {
            'search_EQ_enterpriseName': search_EQ_enterpriseName,
            'search_EQ_signCode': search_EQ_signCode,
            'search_EQ_uniformSocialCredCode': search_EQ_uniformSocialCredCode,
            'search_EQ_orgInstCode': search_EQ_orgInstCode,
            'search_EQ_qryReason': search_EQ_qryReason,
            'search_EQ_source': search_EQ_source,
            'search_EQ_status': search_EQ_status,
            'search_EQ_queryFormat': search_EQ_queryFormat,
            'search_GTE_LTE_queryTime_DATE_RANGE': search_GTE_LTE_queryTime_DATE_RANGE,
            'search_EQ_operator': search_EQ_operator,
            'search_EQ_operOrg': search_EQ_operOrg,
            'search_EQ_cstmsysId': search_EQ_cstmsysId,
            'ids': ids
        }
        req = Request(ServerUrl.ent_resultinfo_exportload_url, data=data, headers=cookie)
        return req.post_download()







if __name__ == "__main__":
    pass